package com.netty4.http.xml;

import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.DefaultFullHttpResponse;

import java.util.List;

public class HttpXmlResponseDecoder extends AbstractHttpXmlDecoder<DefaultFullHttpResponse>{
    protected HttpXmlResponseDecoder(Class<?> clazz) {
        super(clazz);
    }

    protected HttpXmlResponseDecoder(Class<?> clazz, boolean isPrint) {
        super(clazz, isPrint);
    }

    protected void decode(ChannelHandlerContext channelHandlerContext, DefaultFullHttpResponse defaultFullHttpResponse, List<Object> list) throws Exception {
        HttpXmlResponse response = new HttpXmlResponse(defaultFullHttpResponse,decode0(channelHandlerContext,defaultFullHttpResponse.content()));
        list.add(response);
    }
}
